<?php
$inputEmail = trim(strtolower($txtEmail));
//array_push($ActionResults, "ok");
//array_push($ActionResults, "ok");
	if(!$txtFullname) {
		array_push($ActionResults, "Please enter full name.");
		$intFailed++;
	}
	
	if(!ereg("^([a-zA-Z0-9\.]+)\@([a-zA-Z0-9\.\-]+)\.([a-zA-Z]{2,3})$", $inputEmail))
	{
		array_push($ActionResults, "$inputEmail is an invalid Email address.");
		//echo "$inputEmail is an invalid Email address.";
		$intFailed++;
	}
	//print_array($ActionResults);
	
	if($intFailed > 0){
		return(FALSE);
	}
	
	include (MODULE . "/action/mime_mail.inc");

	 $mail = new mime_mail();
	 $mail->from = $inputEmail;
	 $mail->headers = "Errors-To: ".Email_Errors;
	 $mail->to = Email_Contact;
	 $mail->subject = "Comment from web.";
	 $mail->body = "
Name : $txtFullname

Phone : $txtPhone

Address : 
$txtAddress

Email : $txtEmail

Position : $txtPosition
			
Has made the following comment :
	
	$txtComments";
	
	 $mail->send();
	array_push($ActionResults, "Thank you for contacting us.");
	$SCREEN = "welcome";


?>
